import request from "@/utils/request";

// get List
export function getList(data) {
  return request({
    url: "/base/data/dict/list",
    method: "get",
    params: data,
  });
}
// add List
export function addList(data) {
  return request({
    url: "/base/data/dict/insert",
    method: "post",
    data: data,
  });
}

// update List
export function updateList(data) {
  return request({
    url: "/base/data/dict/update",
    method: "post",
    data: data,
  });
}
// delete List
export function deleteList(data) {
  return request({
    url: "/base/data/dict/delete/"+data,
    method: "post",
  });
}
/** 二级  */
// get List
export function getList2(data) {
  return request({
    url: "/base/data/dictsub/list",
    method: "get",
    params: data,
  });
}
// add List
export function addList2(data) {
  return request({
    url: "/base/data/dictsub/insert",
    method: "post",
    data: data,
  });
}

// update List
export function updateList2(data) {
  return request({
    url: "/base/data/dictsub/update",
    method: "post",
    data: data,
  });
}

// delete List
export function deleteList2(data) {
  return request({
    url: "/base/data/dictsub/deleteBatch?ids="+data,
    method: "post",
  });
}
